package com.markerhub.modules.app.controller;

import com.markerhub.common.dto.LoginDto;
import com.markerhub.common.lang.Result;
import com.markerhub.entity.AppBlueLabel;
import com.markerhub.entity.AppUserFeedback;
import com.markerhub.entity.AppUserSetting;
import com.markerhub.modules.app.LoginData;
import com.markerhub.modules.app.annotation.Login;
import com.markerhub.service.AppUserFeedbackService;
import com.markerhub.service.AppUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;

@Slf4j
@RestController
@RequestMapping("/app")
public class FeedBackController {

    @Resource
    AppUserFeedbackService appUserService;

    @Login
    @PostMapping("/user/setUserFeedback")
    public Result login(@Validated @RequestBody AppUserFeedback mUserFeedBack) {

        // 校验用户名密码
        if (mUserFeedBack==null) return Result.fail("请求参数不对");
        log.info("正在请求参数......."+mUserFeedBack.toString());
        appUserService.insert(mUserFeedBack);
        return Result.success("success");
    }



}

